package com.cy.pj.common.vo;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * @author LiuXu
 * @create 2020-07-12 16:27
 */
@Getter
@Setter
public class JsonResult implements Serializable {

    private int state = 1;
    private String message = "OK";
    private Object data;

    public JsonResult() {

    }

    public JsonResult(String message) {
        this.message = message;
    }

    public JsonResult(Object data) {
        this.state = 1;
        this.data = data;
    }

    public JsonResult(Throwable t) {
        this.state = 0;
        this.message = t.getMessage();
    }

}
